This invention relates to managing network connections and, more particularly, to switching Internet contexts without requiring process shutdown.
When a user browses the Internet using a browser on a computer, the user builds up an Internet context for her browsing activity, e.g., through cookies, history and personalized data. As the popularity of Internet browsing has grown, it is not uncommon to have more than one person using a single computer. When different people use the same computer for Internet browsing, Internet contexts can become confused. As a result, one user may no longer know which websites he has visited, and users"" preferences for the same website may conflict.
To accommodate multi-user arrangements, operating systems support xe2x80x9cprofilesxe2x80x9d for different users, each profile defining a particular work environment configured for a particular user. Each user of a computer can maintain his or her own profile, which accommodates the particular user. However, switching from one Internet context to another requires a system-wide process shutdown, meaning that a current user must end any tasks that are in progress and log off before a new user can log in. In addition, most families do not go to the trouble to enable profiles on their home computers and, therefore, they cannot switch contexts at all.
The implementations described herein allow web browsers and other Internet client applications to provide separate contexts for different users, or identities without requiring a process shutdown. This is accomplished by creating an Internet context management component that can select new directory locations for storing non-content state and by tagging content to indicate whether or not the data is personalized to a specific user.
In one implementation, an Internet management object maintains a set of objects called containers, one for each class of Internet state. Each container is located in its own directory on the file system of a computer. This set of containers is called a cache. The information in these containers forms an Internet context that is associated with an identity, each computer user having a unique identity.
When a client wants to change Internet contexts, it supplies a globally unique identifier (guid) that denotes a specific identity to the Internet management object. This initiates the process by which the Internet management object will switch Internet contexts.
The Internet management object shuts down the cache for a current user to prevent any operations from utilizing the cache any further. To simplify naming directories and content tagging, the Internet management object associates each guid with an ordinal according to one described implementation. The Internet management object attempts to create and use a set of containers associated with the new guid using this ordinal. If this is unsuccessful, the Internet management object will restart the cache and continue to use the current Internet context. Otherwise, the Internet management object flushes any authentication credentials, purges session cookies and resets the session start time. In other words, the Internet browser or client application will behave as if it has been closed and restarted.
As the Internet context is built with the new identity, cookies, history and other non-content for the new context are placed in a directory associated with the ordinal that maps to the identity""s guid. However, content cache is handled differently.
To avoid duplicating Internet content across multiple directories (and thus using large amounts of disk space) content is shared across all identities. But there are cases in which an item is meant for only one identity and there are cases wherein the same universal resource locator (URL) will map to different content for different identities. For example, if a web page is a secure page that only some users can access, or if a page uses cookies, etc.
When content is shared, it is stored in a common directory that is used by each identity. This directory contains an index file that has multiple records indicating the location and other information for one or more web pages. When information from a web page is stored, the URL for the web page is hashed and the hash value is used to look up an index record. The index record reveals information regarding this web page data, including a file name where the information is stored.
When content is user-specific, information indicating that the content is not to be shared is provided to the Internet management object. When the Internet management object detects that this indication has been provided, it performs the look up by hashing a combination of the URL and the ordinal associated with the appropriate identity. This locates a unique user-specific index record similar to that used for shared-content, except that the information is specific for the user, which only the proper identity can access the private information stored therein.